import type * as SettingType from '@/api/setting/setting.d';
import type * as CommonType from '@/api/common/common.d';
import type * as FilmReadType from '@/api/filmRead/filmRead.d';
export interface TaskSeriesSearchItem {
  alrCount: number;
  groupId: string;
  seriesAnnoList: SeriesAnnoListItem[];
  status: number;
  submitTime: EpochTimeStamp | null;
  userId: number;
  userName: string;
}

export type SeriesAnnoListItem = {
  airCount: number;
  arId: number;
  seriesUid: string;
}
export interface Component {
  code: string;
  createTime: number;
  data: string;
  editable: boolean;
  id: number;
  name: string;
  parameter: string;
  type: string;
  required: boolean | null;
  updateTime: number;
  result: string;
  // result: string | string[];
  componentId: number;
}

export type InterfaceData = {
  lesionList: SettingType.LesionDataItem[],
  discardList: CommonType.CommonListItem[],
  windowList: CommonType.CommonListItem[],
  seriesList: FilmReadType.ArItem[],
  pageSettingList: FilmReadType.InItSettingsList,
  imageSeriesResList: Component[];
  resultDataList: FilmReadType.ReadResultData;
  seriesAllList: TaskSeriesSearchItem[];
  lesionToImageSeriesList: {
    [x: string]: Component[];
  };
}
export type DictionaryData = {
  lesionList: {[x: string | number]: LesionDictItem };
  seriesCompList: {[x: string | number]: SeriesItem };
  imageSeriesCompList: {[x: string | number]: SeriesItem };
  toolList: {[x: string | number]: FilmReadType.LesionItem[] };
  lesionDataList?: {[x: string | number]: LesionItem | LesionItem[] };
  imageDataList?: {[x: string | number]: LesionItem };
  imageSeriesDataList?: {[x: string | number]: SeriesItem[] };
  seriesDataList?: {[x: string | number]: SeriesItem[] };
  frameList?: FilmReadType.GroupViewItem[]
}
export type FilmRead = {
  currentSeriesIndex: number;
  currentThumbnailIndex: number;
  interfaceData: InterfaceData;
  dictionaryData: DictionaryData;
  loading: boolean;
}

export type LesionDictItem = {
  id: number;
  name: string;
  value: string;
  index: number;
}

export type LesionListItem = {
  itemEyeStatus: boolean;
} & FilmReadType.LesionResultItem

export type LesionItem = {
  [x: string | number]: any;
  index: number;
  eyeStatus: boolean;
  code: string;
  visibile?: boolean;
  lesionList?: LesionListItem[];
  layerStart?: number;
  layerEnd?: number;
  arId?: string | number;
} & FilmReadType.LesionResultItem;

export type SeriesItem = {} & Component;

// export type ToolItem = [] & SettingType.LesionDataItem[];
export type ToolItem = [] & FilmReadType.LesionItem[];

export type AddLesionItem = {
  [x: string | number]: any;
  index: number;
  eyeStatus: boolean;
  code: string;
  visibile?: boolean;
  lesionList?: LesionListItem[];
  id: number;
}